let a = 1;
console.log(a)
new Promise((resolve,reject)=>{
    a = 2;
    console.log(a);

    resolve();
    reject();
}).then(()=>{
    a = 3;
    console.log(a)
}).catch(()=>{
    a = 4;
    console.log(a)
})
a = 5;
console.log(a)